﻿using Microsoft.EntityFrameworkCore;


namespace SharedFeatures;

public class 自动重试 : DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.UseSqlServer("连接字符串",
            options =>
            {
                // 自动重试也是依赖特定数据库驱动程序的功能
                options.EnableRetryOnFailure();
            });
    }

}
